var fs =require("fs");
var data ="zhang chubin demo";
var writerStream =fs.createWriteStream('bb.txt');
writerStream.write(data,"UTF8");
writerStream.end();
writerStream.on("finish",function()
	{
		console.log("写入完成");
	});
writerStream.on("error",function(err)
	{
		console.log(err.stack);

	});
console.log("结束");